<!-- Tiffany -->
<meta charset="UTF-8">
<title>岗位管理</title>

<!-- ajax layout which only needs content area -->
<div class="holyContainer">
	<div class="page-header">
		<h1>岗位管理</h1>

	</div>
	<!-- /.page-header -->

	<div class="row">
		<div class="col-xs-12">
			<!-- PAGE CONTENT BEGINS -->
			<!-- 查询表格-->
			<div class="widget-box">
				<div class="widget-header">
					<h4 class="widget-title">查询条件</h4>
				</div>

				<div class="widget-body" style="display: block;">
					<div class="widget-main">
						<form method="get" name="searchForm" id="searchForm">
							<div class="row">

								<div
									class="col-xs-12 col-sm-6 col-md-5 col-md-push-1 col-lg-4 col-lg-push-2">
									<div class="space space-4"></div>
									<label>部门编号</label> <input name="dept_id" type="text"
										id="dept_id-in-searchForm" value="*" class="form-control"
										onfocus="if (value =='*'){value =''}"
										onblur="if (value ==''){value='*'}" />

									<div class="space space-4"></div>
								</div>
								<div
									class="col-xs-12 col-sm-6 col-md-5 col-md-push-1 col-lg-4 col-lg-push-2">
									<div class="space space-4"></div>
									<label>部门名称</label> 
									<select name="dept_name"
										class="form-control chosen-select" id="search_dept_name_select">
										<option value="*" class="dept_select" selected>所有</option>
									</select>

									<div class="space space-4"></div>
								</div>
							</div>
							<div class="row">

								<div
									class="col-xs-12 col-sm-6 col-md-5 col-md-push-1 col-lg-4 col-lg-push-2">
									<div class="space space-4"></div>
									<label>岗位编号</label> <input name="position_id" type="text"
										id="position_id-in-searchForm" value="*" class="form-control"
										onfocus="if (value =='*'){value =''}"
										onblur="if (value ==''){value='*'}" />

									<div class="space space-4"></div>
								</div>
								<div
									class="col-xs-12 col-sm-6 col-md-5 col-md-push-1 col-lg-4 col-lg-push-2">
									<div class="space space-4"></div>
									<label>岗位名称</label> <input name="position_name" type="text"
										id="position_name-in-searchForm" value="*"
										class="form-control" onfocus="if (value =='*'){value =''}"
										onblur="if (value ==''){value='*'}" />

									<div class="space space-4"></div>
								</div>
							</div>
							<div class="row">

								<div
									class="col-xs-12 col-sm-6 col-md-5 col-md-push-1 col-lg-4 col-lg-push-2">
									<div class="space space-4"></div>
									<label>岗位类型</label> <select name="position_type"
										class="form-control chosen-select" id="search_position_type_select">
										<option value="*" class="type_select" selected>所有</option>
										<option value="管理" class="manage_type_select" >管理</option>
										<option value="技术" class="tech_type_select" >技术</option>
										<option value="销售" class="sale_type_select" >销售</option>
										<option value="市场" class="market_type_select" >市场</option>
										<option value="科研" class="keyan_type_select">科研</option>
										<option value="财务" class="finance_type_select">财务</option>
										<option value="法律" class="law_type_select">法律</option>
										
									</select>

									<div class="space space-4"></div>
								</div>
							</div>


							<!-- 按钮 -->
							<div class="row">
								<div class="col-xs-12 col-md-pull-1 col-lg-pull-2">
									<div class="space space-4"></div>
									<input type="button" class="btn btn-xs pull-right resetbtn" id="resetbtn" value="重置"  />
									<input type="submit"
										class="btn btn-primary btn-xs pull-right position_search_btn"
										value="搜索" />
									<!-- TODO  -->
									<div class="space space-4"></div>
								</div>
							</div>
							<!-- /按钮 -->

						</form>

					</div>
				</div>
			</div>
			<!-- /查询表格-->
			<!-- 分界线 -->
			<div class="hr hr-double hr-dotted hr10"></div>
			<!-- /分界线 -->

		</div>
		<!-- PAGE CONTENT ENDS -->
	</div>
	<!-- /.row -->

	<div class="alert_container row col-xs-8"></div>

	<div class="hr hr-double hr-dotted hr10"></div>

	<!-- 结果表格 -->
	<div class="position_search_container"></div>

</div>

<!-- page specific plugin scripts -->
<script type="text/javascript">
	var scripts = [ null, null ];
	$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
		//inline scripts related to this page
		jQuery(function($) {
			$(".date-picker").datepicker({
				autoclose : true,
				todayHighlight : true,
				endDate : "0d"
			})
			//show datepicker when clicking on the icon
			.next().on(ace.click_event, function() {
				$(this).prev().focus();
			});
		});

	});
</script>

<script src="plugin/validate/jquery.validate.min.js"></script>
<script src="js/position.manage.js"></script>
<script type="text/javascript">
    $(function(){
        $('.chosen').chosen({
           no_results_text: "没有找到匹配的记录",
            allow_single_deselect: true
        });



        $.validator.setDefaults({ ignore: ":hidden:not(select)" });
       /*  $('form').validate({
            highlight: function(element) {
                $(element).closest('.form-group').addClass('has-error');
        },
        unhighlight: function(element) {
            $(element).closest('.form-group').removeClass('has-error');
        },
        errorLabelContainer:$(element).closest('.form-group')
        errorElement: 'em',
        errorClass: 'help-block',
        errorPlacement: function(error, element) {
            if(element.parent('.input-group').length) {
                error.insertAfter(element.parent());
            } else {
                error.insertAfter(element);
            }
        }
    }); */
        $("#resetbtn").click(function(){
    		$("#searchForm")[0].reset();
    		$("#search_dept_name_select").val("*");
    		$("#search_position_type_select").val("*");
    		$("#search_dept_name_select").trigger("chosen:updated");
    		$("#search_position_type_select").trigger("chosen:updated");
    		
    	});
    });

  </script>